package cn.kgc.microservicecloudconsumercategoryfeign80;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
@EnableFeignClients(basePackages = "cn.kgc.microservicecloudconsumercategoryfeign80.service")
@EnableEurekaClient
@SpringBootApplication
public class MicroservicecloudConsumerCategoryFeign80Application {

    public static void main(String[] args) {
        SpringApplication.run(MicroservicecloudConsumerCategoryFeign80Application.class, args);
    }

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
//    @Bean
//    public IRule myRule(){
//        return new RandomRule();
//    }

}
